﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Sys5a10
    {
		private string _listid;
		private string _usercode;
		private string _providname;
		private string _ispublic;
		private string _pagelistid;
		private string _tmp4;
		private string _tmp3;
		private string _tmp1;
		private string _tmp2;
		
        /// <summary>
        /// 主键ID
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
        /// <summary>
        /// 用户
        /// </summary>
		public string Usercode
		{
			get { return _usercode;	 }
			set { _usercode=value;	}
		}
        /// <summary>
        /// 方案名称
        /// </summary>
		public string Providname
		{
			get { return _providname;	 }
			set { _providname=value;	}
		}
        /// <summary>
        /// 是否公用
        /// </summary>
		public string Ispublic
		{
			get { return _ispublic;	 }
			set { _ispublic=value;	}
		}
        /// <summary>
        /// 页面信息
        /// </summary>
		public string Pagelistid
		{
			get { return _pagelistid;	 }
			set { _pagelistid=value;	}
		}
        /// <summary>
        /// tmp4
        /// </summary>
		public string Tmp4
		{
			get { return _tmp4;	 }
			set { _tmp4=value;	}
		}
        /// <summary>
        /// tmp3
        /// </summary>
		public string Tmp3
		{
			get { return _tmp3;	 }
			set { _tmp3=value;	}
		}
        /// <summary>
        /// tmp1
        /// </summary>
		public string Tmp1
		{
			get { return _tmp1;	 }
			set { _tmp1=value;	}
		}
        /// <summary>
        /// tmp2
        /// </summary>
		public string Tmp2
		{
			get { return _tmp2;	 }
			set { _tmp2=value;	}
		}
		
		public static List<Sys5a10> GetSys5a10ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Sys5a10> list = new List<Sys5a10>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Sys5a10 model = GetSys5a10ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Sys5a10 GetSys5a10ByDataRow(DataRow dr)
		{
			Sys5a10 model = new Sys5a10(); //实例化Sys5a10
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			if (dcc.Contains("usercode")&&!(dr["usercode"] is System.DBNull))  
				model.Usercode = ( string)dr["usercode"];
			if (dcc.Contains("providname")&&!(dr["providname"] is System.DBNull))  
				model.Providname = ( string)dr["providname"];
			if (dcc.Contains("ispublic")&&!(dr["ispublic"] is System.DBNull))  
				model.Ispublic = ( string)dr["ispublic"];
			if (dcc.Contains("pagelistid")&&!(dr["pagelistid"] is System.DBNull))  
				model.Pagelistid = ( string)dr["pagelistid"];
			if (dcc.Contains("tmp4")&&!(dr["tmp4"] is System.DBNull))  
				model.Tmp4 = ( string)dr["tmp4"];
			if (dcc.Contains("tmp3")&&!(dr["tmp3"] is System.DBNull))  
				model.Tmp3 = ( string)dr["tmp3"];
			if (dcc.Contains("tmp1")&&!(dr["tmp1"] is System.DBNull))  
				model.Tmp1 = ( string)dr["tmp1"];
			if (dcc.Contains("tmp2")&&!(dr["tmp2"] is System.DBNull))  
				model.Tmp2 = ( string)dr["tmp2"];
			
			return model;
		}
    }
}
